<%@include file="../static/includes.jsp" %>

<%@page contentType="text/html" pageEncoding="UTF-8"%>

<script type="text/javascript">
    
     $(document).ready(function() {
         
          $("#dateStartFirma").mask("9999-99-99");
          $("#dateSend").mask("9999-99-99");
          $("#dateCreateEnvironment").mask("9999-99-99");
          $("#importanceDate").mask("9999-99-99");
 
     });   
    
</script>
<form:form modelAttribute="account" method="POST" >
<fieldset>
        <legend id="legend_galery">Edycja
        </legend>
    <table cellpadding="5" cellspacing="0" border="1" width="60%" align="center">
        <tbody>
                <tr>
                    <td  align="center" >Data wpisu do bazy</td>
                    <td  align="center" >Data oczekiwania startu od firmy</td>
                    <td  align="center" >Data wysłania</td>
                    <td  align="center" >Data logowania firmy</td>
                    <td  align="center" >Data ważności dostępu do konta</td>
                    <td  align="center" >Data utworzenia środowiska</td>
                </tr>
           
                <tr>
                    <td  align="center" ><form:input path="firma.dateCreate" cols="70" rows="4" readonly="true"/></td>
                    <td  align="center" ><form:input path="dateStartFirma" cols="70" rows="4"/></td>
                    <td  align="center" ><form:input path="dateSend" cols="70" rows="4"/></td>
                    <td  align="center" ><form:input path="dateLog" cols="70" rows="4" readonly="true"/></td>
                    <td  align="center" ><form:input path="importanceDate" cols="70" rows="4" /></td>
                    <td  align="center" ><form:input path="dateCreateEnvironment" cols="70" rows="4"/></td>
                </tr>
        </tbody>
    </table>        
                    <form:hidden path="content.idContent" />
                    <form:hidden path="note" />
                    <form:hidden path="copy" />
                    <form:hidden path="meil" />
                    <form:hidden path="idAccount" />
                    <form:hidden path="firma.idFirma" />
                    <form:hidden path="hash" />
                <input  type="submit" value="Zapisz" id="submit" />
 </fieldset>
</form:form>

    
    <div id="fileupload">
        <fieldset>
            
            <legend id="legend_galery">Pliki</legend>
            
            <form:form action="http://localhost:8084/am/fileupload.htm" id="fileuploadForm" enctype="multipart/form-data" method="POST" cssClass="cleanform">
                
		  		<c:if test="${not empty message}">
					<div id="message" class="${message.type}">${message.text}</div>	  		
		  		</c:if>
			
			<label for="file">File</label>
			<input id="file" type="file" name="file" />
                        <input type="hidden" name="id_acc" value='<c:out value="${id_acc}"/>'/>
			<p><button type="submit">Upload</button></p>		

            </form:form>

       </fieldset>     
    </div>


    <script type="text/javascript">
                    
	$(document).ready(function() {
		$('<input type="hidden" name="ajaxUpload" value="true" />').insertAfter($("#file"));
		$("#fileuploadForm").ajaxForm({ success: function(html) {
				$("#fileupload").replaceWith(html);
		               }
		});
	});
                        
    </script>